{% extends 'public/base.html' %}
{% block head %}
    <script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
<script>
$(function () {
    var device = layui.device();
    let date = new Date(+new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '');
    $('#os').text(device.os);
    $('#sys_time').text(date)
})
</script>

{% endblock %}
{% block content %}
            <blockquote class="layui-elem-quote">
                欢迎使用SP_CMS 管理系统!<span class="f-14"> v1.0</span> 开发者QQ：1368419640
                <a href="javascript:;" onclick="level_add('{{ current_user.username }}信息','{{ url_for('cms_bp.admin_edit',id=current_user.id) }}','','600','500')"><span class="user_edit">修改信息</span></a>
            </blockquote>
            <fieldset class="layui-elem-field layui-field-title site-title">
                <legend><a name="default">信息统计</a></legend>
            </fieldset>
            <table class="layui-table">
                <thead>
                <tr>
                    <th>统计</th>
                    <th>栏目数</th>
                    <th>档案库</th>
                    <th>采集规则</th>
                    <th>用户</th>
                    <th>管理员</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td>总数</td>
                    <td>{{ data_s.col_num }}</td>
                    <td>{{ data_s.doc_num }}</td>
                    <td>{{ data_s.coll_num }}</td>
                    <td>{{ data_s.member_num }}</td>
                    <td>{{ data_s.admin_num }}</td>
                </tr>
                </tbody>
            </table>
            <table class="layui-table">
                <thead>
                <tr>
                    <th colspan="2" scope="col">服务器信息</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td>服务器域名</td>
                    <td>{{ data_s.host }}</td>
                </tr>
                <tr>
                    <td>服务器端口</td>
                    <td>{{ data_s.port or '80' }}</td>
                </tr>
                <tr>
                    <td>服务器IP地址</td>
                    <td id="id_address">未联网</td>
                </tr>
                <tr>
                    <td>服务器操作系统</td>
                    <td id="os"></td>
                </tr>
                <tr>
                    <td>系统所在目录</td>
                    <td>{{ data_s.sys_path }}</td>
                </tr>
                <tr>
                    <td>服务器当前日期</td>
                    <td id="sys_time"></td>
                </tr>
                <tr>
                    <td>当前系统用户名</td>
                    <td>{{ current_user.username }}-{{ current_user.remark }}</td>
                </tr>
                </tbody>
            </table>
{% endblock %}
{% block footer_js %}
<script>
$('#id_address').text(returnCitySN["cip"]+' ('+returnCitySN["cname"]+')');
</script>
{% endblock %}